package com.example.mapper.master;

//import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.model.User;
import com.example.model.UserQueryModel;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.cache.decorators.FifoCache;

import java.util.List;

//@CacheNamespace(blocking = true)
//@DS("master")
public interface UserMapper extends BaseMapper<User> {

    List<User> testMybatisOgnl(User user);

    int update(@Param("id") String id,@Param("name") String name);

//    @ResultMap("test")
    Page<User> selectUser(Page<User> page, @Param("age") String age);

    List<User> listUsers(@Param("offset") long offset,@Param("limit")long pageSize);

    List<User> queryUsers(@Param("offset") long offset,@Param("limit")long pageSize);

    long getCount();

    int deleteByCondition(@Param("name") String name,@Param("age") String age);

    List<User> selectAllUser(@Param("model") UserQueryModel model);

}
